#include <51func.h>
int main(int argc, char *argv[])
{
    char cmd[] = "cd dir1";
    printf("%s\n",strtok(cmd," "));
    printf("%s\n",strtok(NULL," "));
    char str[] = "how old are you";
    printf("%s\n",strtok(str," "));
    char *p;
    while((p = strtok(NULL," ")) != NULL){
        printf("%s\n", p);
    }
    char path[] = "/dir1/dir2/dir3/dir4";
    printf("%s\n",strtok(path,"/"));
    while((p = strtok(NULL,"/")) != NULL){
        printf("%s\n", p);
    }
    return 0;
}

